//------------------------------------------------------------------------------ 
// <copyright file="AnimationStep.cs" company="Fm Computer">
//     Copyright (c) Fm Computer di Menatti Fulvia.  All rights reserved.
// </copyright>
//----------------------------------------------------------------------------- 
namespace FmjQuery
{
    using System.Web.UI;

    /// <summary>
    /// Step into Animation
    /// </summary>
    public class AnimationStep
    {
        #region Field
        /// <summary>
        /// List of style action
        /// </summary>
        private Actions tactions;

        /// <summary>
        /// Speed with execute animation
        /// </summary>
        private SpeedType tspeed = SpeedType.normal;
        #endregion

        #region Property
        /// <summary>
        /// Gets or sets Name of group action
        /// </summary>
        public string Name 
        { 
            get; 
            set; 
        }

        /// <summary>
        /// Gets or sets Index of group action
        /// </summary>
        public int Index 
        { 
            get; 
            set; 
        }

        /// <summary>
        /// Gets or sets speed
        /// </summary>
        public SpeedType Speed 
        { 
            get
            {
                return this.tspeed;
            } 

            set
            {
                this.tspeed = value;   
            }
        }

        /// <summary>
        /// Gets or sets millisecond that need for complete animation
        /// </summary>
        public int Duration 
        { 
            get; 
            set; 
        }

        /// <summary>
        /// Gets list of action that execute into animation
        /// </summary>
        [PersistenceMode(PersistenceMode.InnerProperty)]
        public Actions Actions
        {
            get
            {
                if (this.tactions == null)
                {
                    this.tactions = new Actions();
                }

                return this.tactions;
            }
        }
        #endregion
    }
}